import requests
import json

# jsonData = {"user_input":"什么是 LangGraph？"}
jsonData = {"user_input":"西安的天气如何"}
url = "http://127.0.0.1:8000/stream"

response = requests.post(url=url, json=jsonData, stream=True)
response.raise_for_status()
for chunk in response.iter_content(chunk_size=None, decode_unicode=True):
    # print("----\n")
    print(chunk)
    # print(chunk, end="")
    # json_data = json.loads(chunk)
    # print(json_data)
